Skip to content

Add files for installing the library#1

Closed
Murmele wants to merge 4 commits into
LinuxDevon:masterfrom
Murmele:master
Closed

Add files for installing the library#1
Murmele wants to merge 4 commits into
LinuxDevon:masterfrom
Murmele:master

Conversation

@Murmele

@Murmele Murmele commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@Murmele Murmele marked this pull request as ready for review January 4, 2023 22:54
@Murmele

Murmele commented Jan 5, 2023

Copy link
Copy Markdown
Contributor Author

@LinuxDevon

@LinuxDevon LinuxDevon left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't gotten around to package and installing yet. Thanks for this one!

A few quick questions since I haven't used much cpack. I ran this branch to see the output with make package this creates the zip files and an install script. What all needs to be included with this packaging? I see the dbc.pc and install_manifest.txt also in the folder. just wanting to know what to include and/or what to run when creating a release. I will do some more digging later but was curious if you knew or not.

@Murmele

Murmele commented Jan 6, 2023

Copy link
Copy Markdown
Contributor Author

As what I know anything else is needed for distributing the library. I created an Arch Linux package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=dbc_parser_cpp-git
So basically the dbc.pc file is a helper file for cmake which describes the project and all the paths to the library, include paths and other dependencies.

In a cmake project you just simply search for the dbc package. Cmake searches then through a few search paths to find the dbc.pc file and creates from it then a target.
This target can then linked to the library. In the dbc target also the include directories which are needed are included. So you don't have to add them explicitly. Pretty simple ^^ (I also just learned it a few days ago)

FIND_PACKAGE(PkgConfig REQUIRED)
pkg_check_modules(dbc REQUIRED IMPORTED_TARGET dbc)
target_link_libraries(yourApplicationTarget PkgConfig::dbc)

…0) [0|204] "Km/h" DEVICE1,DEVICE2,DEVICE3

- multiple whitespaces at the end:  SG_ TEMPERATURE : 48|16@1+ (0.01,-40) [-40|125] "C"  DEVICE1,DEVICE2,DEVICE3
@Murmele Murmele closed this Jan 6, 2023
@Murmele

Murmele commented Jan 6, 2023

Copy link
Copy Markdown
Contributor Author

I closed this in favor of #5
I just used here the master, but this was not good

@LinuxDevon

Copy link
Copy Markdown
Owner

Alright I will take a look at the new PR. Thanks for the info above! That seems pretty straight forward. Nice to see the AUR also! Been meaning to getting around and learning that. Maybe I will see about adding this to some of the main line distros. Never done something like that before. This would be a great project to learn that on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants